let uuid = require("uuid")

signinError = function(msg) {
    return {
        code: 204,
        msg: msg ? msg : "User Not Found",
        result: []
    }
}

responseOk = function(data) {
    return {
        code: 200,
        msg: "Successful Operation",
        result: data ? data : []
    }
}

supportError = function(msg) {
    return {
        code: 203,
        msg: msg ? msg :"Operator Not Support",
        result: []
    }
}

codeGenerate = function() {
    return uuid.v1();
}

module.exports = {
    signinError,
    responseOk,
    supportError,
    codeGenerate
}
